//Checking for existance and then adding it to Tapestry's structure, trying to minimize the dependencies for this code...
if (Tapestry && Tapestry.Initializer) Tapestry.Initializer["ZeroclipboardString"] = function(config) {
	ZeroClipboard.setMoviePath( config.movie );
	var clip = new ZeroClipboard.Client();
	clip.setText( config.value );
	clip.setHandCursor( config.hand );
	//No guarantee, but with this slow delay there's a reasonable chance the flash-component gets glued after Cufon/FontFace replacements have taken place
	//Also help ensure it happens after any other SWFObject replacements may have occurred (although this should be managed by this replacement being called 'late' by T5)
	window.setTimeout(function(){clip.glue( config.target )},100);
};
if (Tapestry && Tapestry.Initializer) Tapestry.Initializer["ZeroclipboardDOM"] = function(config) {
	ZeroClipboard.setMoviePath( config.movie );
	var clip = new ZeroClipboard.Client();
	clip.setText( '' );
	clip.setHandCursor( config.hand );
	clip.addEventListener( 'mouseDown', function(client) { 
            // set text to copy here
            clip.setText( document.getElementById( config.origin ).innerHTML );
    });
	if (config.alert) {
		clip.addEventListener( 'onComplete', function(client, text) { 
	            alert( config.alert.replace("%text%", text) );
	    });
	}
	//No guarantee, but with this slow delay there's a reasonable chance the flash-component gets glued after Cufon/FontFace replacements have taken place
	//Also help ensure it happens after any other SWFObject replacements may have occurred (although this should be managed by this replacement being called 'late' by T5)
	window.setTimeout(function(){clip.glue( config.target )},100);
};